import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.Authenticator;
import java.net.HttpURLConnection;
import java.net.ProtocolException;
import java.net.URL;
import java.util.Date;
import java.util.Properties;

public class SendXml {
	// 27.54.194.163
	public static String proxyServer = "27.54.226.163";
	public static String proxyPort = "808";

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		Properties systemProperties = System.getProperties();

		systemProperties.setProperty("http.proxyHost", proxyServer);

		systemProperties.setProperty("http.proxyPort", proxyPort);
		// Authenticator
		// .setDefault(new BasicAuthenticator("pengchb2002", "123abc"));

		try {
			String URI = "http://203.156.242.124:8088/byc-domflight-server/domFlight.shtml";
			URL url = new URL(URI);
			connecteNet(url);
		} catch (Exception e) {
			e.printStackTrace();
			throw new RuntimeException(e);
		}

	}

	private static void connecteNet(URL url) throws IOException,
			ProtocolException, UnsupportedEncodingException {
		HttpURLConnection connection = (HttpURLConnection) url.openConnection();
		connection.setDoOutput(true);
		connection.setInstanceFollowRedirects(false);
		connection.setRequestProperty("Content-Type", "application/xml");
		// connection.setRequestProperty("Accept-Charset", "utf-8");
		// connection.setRequestProperty("contentType", "utf-8");
		connection.setRequestMethod("POST");

		OutputStream os = connection.getOutputStream();
		// Write your XML to the OutputStream (JAXB is used in this example)
		String cont = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
				+ "<request><header><accountID>xysc01</accountID><digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip>"
				+ "<serviceName>getFlightPrice</serviceName></header>"
				+ "<body><oa>CTU</oa><aa>PEK</aa><fDate>2012-11-27</fDate></body></request>";

//		cont = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?><request>"
//				+ "<header><accountID>cs005</accountID><digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip>"
//				+ "<serviceName>getSpecFlightPrice</serviceName></header><body><oa>PEK</oa><aa>SHA</aa>"
//				+ "<date>2012-11-14</date><days>5</days></body></request>";

		//
		// cont="<?xml version=\"1.0\"
		// encoding=\"utf-8\"?><request><header><accountID>xysc01</accountID><serviceName>orderFlight</serviceName><digitalSign>1234</digitalSign><gzip>0</gzip></header><body><OrderFlight_1_6><Flights><Flight><Carrier>CA</Carrier><FlightNo>CA1858</FlightNo><FromCity>SHA</FromCity><ArriveCity>PEK</ArriveCity><ClassCode>K</ClassCode><YPrice>1130.0</YPrice><ClassPrice>850.0</ClassPrice><FuelSurTax>130.0</FuelSurTax><AirportTax>50.0</AirportTax><DepartureDate>2012-10-01</DepartureDate><DepartureTime>07:55</DepartureTime><ArrivalDate>2012-10-01</ArrivalDate><ArrivalTime>07:55</ArrivalTime></Flight></Flights><Passengers><Passenger><PsgID>1</PsgID><Name>�����</Name><PsgType>ADT</PsgType><CardType>NI</CardType><CardNo>220722199611012371</CardNo><BirthDay/><CarrierPsgID/><Country>CN</Country><MobilePhone>13830797964</MobilePhone><InsueSum>0</InsueSum><InsueFee></InsueFee></Passenger></Passengers><Prices><Price><PriceID>0</PriceID><PsgType>ADT</PsgType><Fare>1620.00</Fare><AgentComm>6.00</AgentComm><FuelSurTax>260.00</FuelSurTax><AirportTax>100.00</AirportTax></Price></Prices><OrderInfo><Linker>����</Linker><Address/><Telephone>15811040479</Telephone><IsDomc>D</IsDomc><TicketLimitDate>2012-09-11</TicketLimitDate><TicketLimitTime>22:00</TicketLimitTime><BalanceMoney>100</BalanceMoney><CustomerOrderNo>21312312334</CustomerOrderNo><CustomerNo/></OrderInfo><LinkerInfo><PayType>ZH</PayType><Address/><LinkerName>����</LinkerName><Zip/><Telphone>15811040479</Telphone><MobilePhone>85868881</MobilePhone><SendTime>2012-09-12</SendTime><LinkerEmail>lyg@126.com</LinkerEmail><NeedInvoices>N</NeedInvoices><InvoicesSendType>B</InvoicesSendType><SendTktsTypeCode>By</SendTktsTypeCode><SendTktDepID>4</SendTktDepID><SendTktDepName>Yeesky</SendTktDepName></LinkerInfo><InsuranceInfo><InsuranceId></InsuranceId><ShouldGath></ShouldGath><ShouldPay></ShouldPay><RetMoney></RetMoney><Gain></Gain><InsuranceCount></InsuranceCount><InsuranceSummary></InsuranceSummary></InsuranceInfo></OrderFlight_1_6></body></request>";

		// FM9542<?xml version=\"1.0\"
		// encoding=\"utf-8\"?><request><header><accountID>xysc01</accountID><serviceName>orderFlight</serviceName><digitalSign>1234</digitalSign><gzip>0</gzip></header><body><OrderFlight_1_6><Flights><Flight><Carrier>CA</Carrier><FlightNo>1858</FlightNo><FromCity>SHA</FromCity><ArriveCity>PEK</ArriveCity><ClassCode>K</ClassCode><YPrice>1130.0</YPrice><ClassPrice>850.0</ClassPrice><FuelSurTax>130.0</FuelSurTax><AirportTax>50.0</AirportTax><DepartureDate>2012-10-01</DepartureDate><DepartureTime>07:55</DepartureTime><ArrivalDate>2012-10-01</ArrivalDate><ArrivalTime>07:55</ArrivalTime></Flight></Flights><Passengers><Passenger><PsgID>1</PsgID><Name>�����</Name><PsgType>ADT</PsgType><CardType>NI</CardType><CardNo>220722199611012371</CardNo><BirthDay/><CarrierPsgID/><Country>CN</Country><MobilePhone>13830797964</MobilePhone><InsueSum>0</InsueSum><InsueFee></InsueFee></Passenger></Passengers><Prices><Price><PriceID>0</PriceID><PsgType>ADT</PsgType><Fare>1620.00</Fare><AgentComm>6.00</AgentComm><FuelSurTax>260.00</FuelSurTax><AirportTax>100.00</AirportTax></Price></Prices><OrderInfo><Linker>����</Linker><Address/><Telephone>15811040479</Telephone><IsDomc>D</IsDomc><TicketLimitDate>2012-09-11</TicketLimitDate><TicketLimitTime>22:00</TicketLimitTime><BalanceMoney>100</BalanceMoney><CustomerOrderNo>21312312334</CustomerOrderNo><CustomerNo/></OrderInfo><LinkerInfo><PayType>ZH</PayType><Address/><LinkerName>����</LinkerName><Zip/><Telphone>15811040479</Telphone><MobilePhone>85868881</MobilePhone><SendTime>2012-09-12</SendTime><LinkerEmail>lyg@126.com</LinkerEmail><NeedInvoices>N</NeedInvoices><InvoicesSendType>B</InvoicesSendType><SendTktsTypeCode>By</SendTktsTypeCode><SendTktDepID>4</SendTktDepID><SendTktDepName>Yeesky</SendTktDepName></LinkerInfo><InsuranceInfo><InsuranceId></InsuranceId><ShouldGath></ShouldGath><ShouldPay></ShouldPay><RetMoney></RetMoney><Gain></Gain><InsuranceCount></InsuranceCount><InsuranceSummary></InsuranceSummary></InsuranceInfo></OrderFlight_1_6></body></request>

		// String cont = "<?xml version=\"1.0\" encoding=\"UTF-8\"
		// standalone=\"yes\"?><request>"
		// +
		// "<header><accountID>xysc01</accountID><digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip>"
		// + "<serviceName>getFlightStop</serviceName></header>"
		// +
		// "<body><fNo>FM9542</fNo><fDate>2012-11-01</fDate></body></request>";

		 cont = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" +
		 "<request>" +
		 "<header>" +
		 "<accountID>bycxysc01</accountID>" +
		 "<serviceName>orderFlight</serviceName>" +
		 "<digitalSign>F74F684FEC21E74C</digitalSign>" +
		 "<gzip>0</gzip>" +
		 "</header>" +
		 "<body>" +
		 "<OrderFlight_1_6>" +
		 "<Flights>" +
		 "<Flight>" +
		 "<Carrier>CA</Carrier>" +
		 "<FlightNo>1858</FlightNo>" +
		 "<FromCity>SHA</FromCity>" +
		 "<ArriveCity>PEK</ArriveCity>" +
		 "<ClassCode>K</ClassCode>" +
		 "<YPrice>1130</YPrice>" +
		 "<ClassPrice>850</ClassPrice>" +
		 "<FuelSurTax>130</FuelSurTax>" +
		 "<AirportTax>50</AirportTax>" +
		 "<DepartureDate>2012-12-15</DepartureDate>" +
		 "<DepartureTime>07:55</DepartureTime>" +
		 "<ArrivalDate>2012-12-15</ArrivalDate>" +
		 "<ArrivalTime>07:55</ArrivalTime>" +
		 "</Flight>" +
		 "</Flights>" +
		 "<Passengers>" +
		 "<Passenger>" +
		 "<PsgID>1</PsgID>" +
		 "<Name>张三</Name>" +
		 "<PsgType>ADT</PsgType>" +
		 "<CardType>NI</CardType>" +
		 "<CardNo>513622198202074591</CardNo>" +
		 "<BirthDay />" +
		 "<CarrierPsgID />" +
		 "<Country>CN</Country>" +
		 "<MobilePhone>13120827349</MobilePhone>" +
		 "<InsueSum>0</InsueSum>" +
		 "<InsueFee></InsueFee>" +
		 "</Passenger>" +
		 "</Passengers>" +
		 "<Prices>" +
		 "<Price>" +
		 "<PriceID>0</PriceID>" +
		 "<PsgType>ADT</PsgType>" +
		 "<Fare>1620</Fare>" +
		 "<AgentComm>6</AgentComm>" +
		 "<FuelSurTax>260</FuelSurTax>" +
		 "<AirportTax>100</AirportTax>" +
		 "</Price>" +
		 "</Prices>" +
		 "<OrderInfo>" +
		 "<Linker>张三</Linker>" +
		 "<Address />" +
		 "<Telephone>13262608113</Telephone>" +
		 "<IsDomc>D</IsDomc>" +
		 "<TicketLimitDate>2012-12-15</TicketLimitDate>" +
		 "<TicketLimitTime>22:00</TicketLimitTime>" +
		 "<BalanceMoney>100</BalanceMoney>" +
		 "<CustomerOrderNo>21312312334</CustomerOrderNo>" +
		 "<CustomerNo />" +
		 "</OrderInfo>" +
		 "<LinkerInfo>" +
		 "<PayType>ZH</PayType>" +
		 "<Address />" +
		 "<LinkerName>张三</LinkerName>" +
		 "<Zip />" +
		 "<Telphone>15811040479</Telphone>" +
		 "<MobilePhone>85868881</MobilePhone>" +
		 "<SendTime>2012-12-15</SendTime>" +
		 "<LinkerEmail>pcb@163.com</LinkerEmail>" +
		 "<NeedInvoices>N</NeedInvoices>" +
		 "<InvoicesSendType>B</InvoicesSendType>" +
		 "<SendTktsTypeCode>By</SendTktsTypeCode>" +
		 "<SendTktDepID>4</SendTktDepID>" +
		 "<SendTktDepName>Yeesky</SendTktDepName>" +
		 "</LinkerInfo>" +
		 "<InsuranceInfo>" +
		 "<InsuranceId><InsuranceId>" +
		 "<ShouldGath><ShouldGath>" +
		 "<ShouldPay><ShouldPay>" +
		 "<RetMoney><RetMoney>" +
		 "<Gain><Gain>" +
		 "<InsuranceCount><InsuranceCount>" +
		 "<InsuranceSummary></InsuranceSummary>" +
		 "</InsuranceInfo>" +
		 "</OrderFlight_1_6>" +
		 "</body>" +
		 "</request>";
		 
		 
//		 cont = "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>" +
//		 "<request>" +
//		 "<header>" +
//		 "<accountID>cs005</accountID>" +
//		 "<digitalSign>F74F684FEC21E74C</digitalSign>" +
//		 "<gzip>0</gzip>" +
//		 "<serviceName>orderFlight</serviceName>" +
//		 "</header>" +
//		 "<body>" +
//		 "<OrderFlight_1_6>" +
//		 "<Flights>" +
//		 "<Flight>" +
//		 "<Carrier>FM</Carrier>" +
//		 "<FlightNo>FM9542</FlightNo>" +
//		 "<FromCity>CTU</FromCity>" +
//		 "<ArriveCity>SHA</ArriveCity>" +
//		 "<ClassCode>Y</ClassCode>" +
//		 "<YPrice>970</YPrice>" +
//		 "<ClassPrice>970</ClassPrice>" +
//		 "<FuelSurTax>150</FuelSurTax>" +
//		 "<AirportTax>50</AirportTax>" +
//		 "<DepartureDate>2012-12-15</DepartureDate>" +
//		 "<DepartureTime>12:20</DepartureTime>" +
//		 "<ArrivalDate>2012-12-15</ArrivalDate>" +
//		 "<ArrivalTime>14:50</ArrivalTime>" +
//		 "</Flight>" +
//		 "</Flights>" +
//		 "<Passengers>" +
//		 "<Passenger>" +
//		 "<BirthDay>1982-02-07</BirthDay>" +
//		 "<CardNo>513622198202074591</CardNo>" +
//		 "<CardType>NI</CardType>" +
//		 "<Country>CN</Country>" +
//		 "<InsueFee>20</InsueFee>" +
//		 "<InsueSum>1</InsueSum>" +
//		 "<MobilePhone>13120827349</MobilePhone>" +
//		 "<Name>张三</Name>" +
//		 "<PsgID>1</PsgID>" +
//		 "<PsgType>ADT</PsgType>" +
//		 "</Passenger>" +
//		 "</Passengers>" +
//		 "<Prices>" +
//		 "<Price>" +
//		 "<PriceID>1</PriceID>" +
//		 "<PsgType>ADT</PsgType>" +
//		 "<Fare>970</Fare>" +
//		 "<AgentComm>2</AgentComm>" +
//		 "<FuelSurTax>150</FuelSurTax>" +
//		 "<AirportTax>50</AirportTax>" +
//		 "</Price>" +
//		 "</Prices>" +
//		 "<OrderInfo>" +
//		 "<Linker>张三</Linker>" +
//		 "<Address>上海浦东</Address>" +
//		 "<Telephone>13262608113</Telephone>" +
//		 "<IsDomc>D</IsDomc>" +
//		 "<TicketLimitDate>2012-12-15</TicketLimitDate>" +
//		 "<TicketLimitTime>2012-12-15 11:11</TicketLimitTime>" +
//		 "<BalanceMoney>1120</BalanceMoney>" +
//		 "<CustomerOrderNo>10001</CustomerOrderNo>" +
//		 "</OrderInfo>" +
//		 "<LinkerInfo>" +
//		 "<PayType>ZH</PayType>" +
//		 "<LinkerName>张三</LinkerName>" +
//		 "<MobilePhone>15811040479</MobilePhone>" +
//		 "<LinkerEmail>pcb@163.com</LinkerEmail>" +
//		 "<NeedInvoices>Y</NeedInvoices>" +
//		 "<InvoicesSendType>A</InvoicesSendType>" +
//		 "<SendTktsTypeCode>ZQ</SendTktsTypeCode>" +
//		 "</LinkerInfo>" +
//		 "<InsuranceInfo>" +
//		 "<InsuranceId>1<InsuranceId>" +
//		 "<ShouldGath>20<ShouldGath>" +
//		 "<ShouldPay>20<ShouldPay>" +
//		 "<RetMoney>1<RetMoney>" +
//		 "<Gain>1<Gain>" +
//		 "<InsuranceCount>1<InsuranceCount>" +
//		 "<InsuranceSummary>20</InsuranceSummary>" +
//		 "</InsuranceInfo>" +
//		 "</OrderFlight_1_6>" +
//		 "</body>" +
//		 "</request>";
		 String header = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
//		 getFlightPrice
//		 cont = header+"<request>	<header><accountID>cs005</accountID><serviceName>getFlightPrice</serviceName><digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip>	</header>	<body><oa>SHA</oa><aa>CSX</aa><fDate>2012-12-16</fDate><cabinClass></cabinClass><carrier></carrier>	</body></request>";
		 
//		 checkbin
//		 cont= header +"<request>	<header><accountID>cs005</accountID><serviceName>checkFlightCabin</serviceName><digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip>	</header>	<body><fno>FM9395</fno><date>2012-12-02</date><code>P</code><seat>9</seat>	</body></request>";
		 
		 
//		 orderFight
//		 cont=header +"<request><header><accountID>cs005</accountID><serviceName>orderFlight</serviceName><digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip></header><body><OrderFlight_1_6><Flights><Flight><Carrier>CA</Carrier><FlightNo>1858</FlightNo><FromCity>SHA</FromCity><ArriveCity>PEK</ArriveCity><ClassCode>K</ClassCode><YPrice>1130.0</YPrice><ClassPrice>850.0</ClassPrice><FuelSurTax>130.0</FuelSurTax><AirportTax>50.0</AirportTax><DepartureDate>2012-12-12</DepartureDate><DepartureTime>07:55</DepartureTime><ArrivalDate>2012-12-12</ArrivalDate><ArrivalTime>07:55</ArrivalTime></Flight></Flights><Passengers><Passenger><PsgID>1</PsgID><Name>孙悟空</Name><PsgType>ADT</PsgType><CardType>NI</CardType><CardNo>220722199611012371</CardNo><BirthDay /><CarrierPsgID /><Country>CN</Country><MobilePhone>13830797964</MobilePhone><InsueSum>0</InsueSum><InsueFee></InsueFee></Passenger></Passengers><Prices><Price><PriceID>0</PriceID><PsgType>ADT</PsgType><Fare>1620.00</Fare><AgentComm>6.00</AgentComm><FuelSurTax>260.00</FuelSurTax><AirportTax>100.00</AirportTax></Price></Prices><OrderInfo><Linker>乐颜 </Linker><Address /><Telephone>15811040479</Telephone><IsDomc>D</IsDomc><TicketLimitDate>2012-12-11</TicketLimitDate><TicketLimitTime>22:00</TicketLimitTime><BalanceMoney>100</BalanceMoney><CustomerOrderNo>21312312334</CustomerOrderNo><CustomerNo /></OrderInfo><LinkerInfo><PayType>ZH</PayType><Address /><LinkerName>乐颜</LinkerName><Zip /><Telphone>15811040479</Telphone><MobilePhone>85868881</MobilePhone><SendTime>2012-12-12</SendTime><LinkerEmail>lyg@126.com</LinkerEmail><NeedInvoices>N</NeedInvoices><InvoicesSendType>B</InvoicesSendType><SendTktsTypeCode>By</SendTktsTypeCode><SendTktDepID>4</SendTktDepID><SendTktDepName>Yeesky</SendTktDepName></LinkerInfo><InsuranceInfo><InsuranceId></InsuranceId><ShouldGath></ShouldGath><ShouldPay></ShouldPay><RetMoney></RetMoney><Gain></Gain><InsuranceCount></InsuranceCount><InsuranceSummary></InsuranceSummary></InsuranceInfo></OrderFlight_1_6></body></request>";
//		 <response><header><code>50000</code><content>未知错误，描述：价格参数有误!</content></header></response>
		 
//		 cancelOrder
//		 cont=header +"<request>	<header>		<accountID>cs005</accountID>		<serviceName>cancelOrder</serviceName>		<digitalSign>F74F684FEC21E74C</digitalSign>		<gzip>0</gzip>	</header>	<body>		<CancelFlight_1_0>			<SubsOrderNo>209130956005</SubsOrderNo>			<Terminal></Terminal>			<Operator></Operator>			<Passport></Passport>			<CancelPnr>Y</CancelPnr>		</CancelFlight_1_0>	</body></request>";
//		 payNotice
//		 cont=header +"<request>	<header>		<accountID>cs005</accountID>		<serviceName>payNotice</serviceName>		<digitalSign>F74F684FEC21E74C</digitalSign>		<gzip>0</gzip>	</header>	<body>		<AskOrderTicket_1_1>			<SubsOrderNo>209131501001</SubsOrderNo>			<NotifyURL>http://203.156.242.124:8081/Test/TestServlet</NotifyURL>			<NotifyType>POST</NotifyType>			<BankCode />			<BankNo />			<BalanceDate />		</AskOrderTicket_1_1>	</body></request>";
		 
//		 
//		 cont=header +"<request>	<header>		<accountID>cs005</accountID>		<serviceName>getStatusByOrderId</serviceName>		<digitalSign>F74F684FEC21E74C</digitalSign>		<gzip>0</gzip>	</header>	<body>		<QueryOrderStatus_1_0>			<OrderNo>209031528001</OrderNo>		</QueryOrderStatus_1_0>	</body></request>";
		 
//		 cont = "<?xml version=\"1.0\" encoding=\"utf-8\"?>"
//				+ "<request><header><accountID>xysc01</accountID><digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip>"
//				+ "<serviceName>getFlightPrice</serviceName></header>"
//				+ "<body><oa>CTU</oa><aa>PEK</aa><fDate>2012-11-27</fDate></body></request>";

		 cont=header +"<request><header><accountID>bycxysc01</accountID><serviceName>orderFlight</serviceName>" +
		 		"<digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip>	</header>	<body><OrderFlight_1_6>	" +
		 		"<Flights><Flight>	<Carrier>CA</Carrier>	<FlightNo>1858</FlightNo>	" +
		 		"<FromCity>SHA</FromCity>	<ArriveCity>PEK</ArriveCity>	<ClassCode>K</ClassCode>	" +
		 		"<YPrice></YPrice>	<ClassPrice>850.0</ClassPrice>	<FuelSurTax>140.0</FuelSurTax>	" +
		 		"<AirportTax>50.0</AirportTax>	<DepartureDate>2012-12-12</DepartureDate>	" +
		 		"<DepartureTime>07:55</DepartureTime>	<ArrivalDate>2012-12-12</ArrivalDate>	" +
		 		"<ArrivalTime>10:15</ArrivalTime></Flight>	</Flights>	<Passengers><Passenger>	<PsgID>1</PsgID>	" +
		 		"<Name>孙悟空</Name>	<PsgType>ADT</PsgType>	<CardType>NI</CardType>	" +
		 		"<CardNo>220722199611012371</CardNo>	<BirthDay />	<CarrierPsgID />	" +
		 		"<Country>CN</Country>	<MobilePhone>13830797964</MobilePhone>	<InsueSum>0</InsueSum>	<InsueFee>" +
		 		"</InsueFee></Passenger>	</Passengers>	<Prices><Price>	<PriceID>0</PriceID>	<PsgType>ADT</PsgType>	" +
		 		"<Fare>1330.00</Fare>	<AgentComm>10.00</AgentComm>	<FuelSurTax>140.00</FuelSurTax>	" +
		 		"<AirportTax>50.00</AirportTax></Price>	</Prices>	<OrderInfo>" +
		 		"<Linker>乐颜 </Linker><Address /><Telephone>15811040479</Telephone><IsDomc>D</IsDomc>" +
		 		"<TicketLimitDate>2012-12-11</TicketLimitDate>" +
		 		"<TicketLimitTime>22:00</TicketLimitTime><BalanceMoney>100</BalanceMoney>" +
		 		"<CustomerOrderNo>21312312334</CustomerOrderNo><CustomerNo />	</OrderInfo>	" +
		 		"<LinkerInfo><PayType>ZH</PayType><Address /><LinkerName>乐颜</LinkerName><Zip /><Telphone>15811040479</Telphone>" +
		 		"<MobilePhone>85868881</MobilePhone><SendTime>2012-12-12</SendTime><LinkerEmail>lyg@126.com</LinkerEmail>" +
		 		"<NeedInvoices>N</NeedInvoices><InvoicesSendType>B</InvoicesSendType><SendTktsTypeCode>By</SendTktsTypeCode>" +
		 		"<SendTktDepID>4</SendTktDepID><SendTktDepName>Yeesky</SendTktDepName>	</LinkerInfo>	" +
		 		"<InsuranceInfo><InsuranceId></InsuranceId><ShouldGath></ShouldGath><ShouldPay></ShouldPay><RetMoney></RetMoney><Gain></Gain><InsuranceCount></InsuranceCount><InsuranceSummary></InsuranceSummary>	</InsuranceInfo></OrderFlight_1_6>	</body></request>";

//		 cont = "<?xml version=\"1.0\" encoding=\"utf-8\"?><request>" +
//		 		"<header><accountID>xysc01</accountID><serviceName>orderFlight</serviceName>" +
//		 		"<digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip></header> " +
//		 		"<body><OrderFlight_1_6> <Flights><Flight>" +
//		 		"<Carrier>CA</Carrier> <FlightNo>1858</FlightNo>" +
//		 		"<FromCity>SHA</FromCity> <ArriveCity>PEK</ArriveCity>" +
//		 		"<ClassCode>K</ClassCode> <YPrice>1130.0</YPrice><ClassPrice>850.0</ClassPrice> <FuelSurTax>130.0</FuelSurTax>" +
//		 		"<AirportTax>50.0</AirportTax><DepartureDate>2012-12-01</DepartureDate>" +
//		 		"<DepartureTime>07:55</DepartureTime>" +
//		 		"<ArrivalDate>2012-12-01</ArrivalDate>" +
//		 		"<ArrivalTime>07:55</ArrivalTime></Flight></Flights><Passengers><Passenger><PsgID>1</PsgID>";
//		cont = "<?xml version=\"1.0\" encoding=\"utf-8\"?><request><header>"
//				+ "<accountID>xysc01</accountID><serviceName>checkFlightCabin</serviceName><digitalSign>F74F684FEC21E74C</digitalSign><gzip>0</gzip></header><body><fno>FM9542</fno><date>2012-11-15</date><code>M</code><seat>1</seat></body></request>";

		System.out.println(new Date().toLocaleString() + "\t" + cont);
		os.write(cont.getBytes(), 0, cont.getBytes().length);
		os.flush();

		InputStream in = connection.getInputStream();
		// readFileByChars(in);
		BufferedReader bin = new BufferedReader(new InputStreamReader(in,
				"utf-8"));
		String inputLine;
		while ((inputLine = bin.readLine()) != null) {
			System.out.println(inputLine);
		}

		bin.close();
		in.close();

		connection.disconnect();
	}

}
